package com.example.weibo_app.service.impl;

import com.example.weibo_app.domain.Favorite;
import com.example.weibo_app.mapper.FavoriteMapper;
import com.example.weibo_app.service.FavoriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FavoriteServiceImpl implements FavoriteService {

    @Autowired
    private FavoriteMapper favoriteMapper;

    @Override
    public int addFavorite(Favorite favorite) {
        return favoriteMapper.insertFavorite(favorite);
    }

    @Override
    public int removeFavorite(Favorite favorite) {
        return favoriteMapper.deleteFavorite(favorite);
    }
}
